<?php
/**
 * Created by PhpStorm.
 * User: zhongyb
 * Date: 2016/6/7
 * Time: 11:19
 */
namespace common\entities\common;

use common\entities\ConfigEntity;
use Yii;

/**
 * This is the model class for table "myscrm_productquota".
 *
 * @property string $PoductQuotaId
 * @property string $BaseProductId
 * @property string $OrganizationId
 * @property integer $Quota
 * @property integer $QuotaType
 * @property integer $UsedNum
 */
class MyscrmProductquotaEntity extends ConfigEntity
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'myscrm_productquota';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['PoductQuotaId', 'OrganizationId', 'Quota', 'QuotaType'], 'required'],
            [['Quota', 'QuotaType', 'UsedNum'], 'integer'],
            [['PoductQuotaId', 'BaseProductId', 'OrganizationId'], 'string', 'max' => 36]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'PoductQuotaId' => 'Poduct Quota ID',
            'BaseProductId' => 'Base Product ID',
            'OrganizationId' => 'Organization ID',
            'Quota' => 'Quota',
            'QuotaType' => 'Quota Type',
            'UsedNum' => 'Used Num',
        ];
    }
}